package com.chj.service;

import java.util.Date;
import java.util.List;

import com.chj.entity.Order;
import com.chj.entity.ResultModel;

public interface OrderService {
    
    //添加订单
    public int addOrder(Order order);
    //修改订单
    public int modifyOrder(Order order);
    //获取单个订单
    public Order getOrder(Order order);
    //获取所有订单
    public List<Order> getOrderList();
    //按限制条件获取订单
    public List<Order> getOrderBy();
    //修改订单相关信息
    public int updateOrder(Order order);

    //全额支付订单
    public int payForOrder(String orderPk);
    
    //取消
    public ResultModel deleteForOrder(String orderPk);
    
    public List<Order> getOrderByUserId(String userId);

    public List<Order> getOrderByUserIdByNow(String userPk, Date date);

    public List<Order> getOrderByUserIdByNowOver(String userPk, Date date);

    //分页订单查询
  //通过条件查询后台
    public List<Order> getOrderListBy(String userName
                                    ,String orderId
                                    ,String createDateFrom
                                    ,String createDateTo
                                    ,int page
                                    ,int rows);

    //通过条件查询后台的数量
    public int getOrderListSizeBy(String userName
                                ,String orderId
                                ,String createDateFrom
                                ,String createDateTo);

}
